package com.example.dynamicdatasourcetest.pojo;

public class HttpResonse<T> {
    private Integer code;

    private Boolean successful;

    private String message;

    private T data;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Boolean getSuccessful() {
        return successful;
    }

    public void setSuccessful(Boolean successful) {
        this.successful = successful;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }


    public HttpResonse<?> successful(T data){
        this.code= 200;
        this.successful = true;
        this.message = "successful";
        this.data = data;
        return this;
    }
}
